Text Pointer Tables for Items, Weapons, Armor:
0x02000010

PC Animation Settings Pointers:
0x020004D8

Text Pointers for Stat Names:
0x02000570
-Contains pointers to text for stat names - Strength, Agility, Stamina etc
-Used during levelup

Variable Memory:
Pointer at [0x2000584]
For storage of some inter-function variables, data tables, structs etc
Theoretically, the exact location depends on wherever there's space to hold everything...
...but from observation, it seems that VarMem always begins at 0x02001F20.
Don't take it as an absolute fact though!


RNG State:
0x02001A18
	-Begins at 0x00000000

Key input bits:
0x02000008: Keys pressed on the previous frame
0x0200000A: Frame counter for held keys (initial)
0x0200000C: Frame counter for held keys (repeat)
0x02001DF0: All keys currently pressed
0x02001DF4: All keys newly pressed this frame
0x02001DF8: Keys newly pressed, then held down for exactly 36 frames, and every 6 frames afterwards
Both are copied from $04000130 as normal.
	-Some routines read $1DF8 (usually for direction keys), others read $1DF4 (usually A/B buttons)
Input bits:
	$01: A
	$02: B
	$04: Select
	$08: Start
	$10: Right
	$20: Left
	$40: Up
	$80: Down
	$100: R
	$200: L

Chest State Bitfield:
0x02002074 (? may be variable)
Each bit corresponds to a chest in the world.

Character Data:
0x020026CC	- 0x48 bytes for each character
+$00-0C: Name (2 bytes per character)
+$0D: Class ID
+$0E: Condition
+$0F: Level
+$10-13: EXP

+$14-15: Current HP
+$16-17: Max HP
+$18-19: Current MP
+$1A-1B: Max MP
+$1C: Magic Level
+$1D: Strength
+$1E: Agility
+$1F: Intellect
+$20: Stamina
+$21: Luck

+$22-23: Hit Rate (base)
+$24-35: Evade (base)
+$26-27: Magic Defense/Resistance

+$28: Weapon slot ID
+$29: Shield slot ID
+$2A: Headgear slot ID
+$2B: Armor slot ID
+$2C: Hands slot ID

+$2D-2F: Spell Level 1 spells
+$30-32: Spell Level 2
+$33-35: Spell Level 3
+$36-38: Spell Level 4
+$39-3B: Spell Level 5
+$3C-3E: Spell Level 6
+$3F-41: Spell Level 7
+$42-44: Spell Level 8

+$45: ?
+$46: ?
+$47: ? Probably all padding

Inventory (out of battle):
0x020027EC
Each item takes up four bytes:
+$00: Item type; 01 for items, 02 for weapons, 03 for armors
+$01: Item sub-ID
+$02: Item quantity
+$03: Padding; often has garbage values

Gold/Gil:
0x02002AB4
Game Clock:
0x02002AB8
Step Counter(?):
0x02002ABC

Custom Window Palette:
0x02002AC2

Menu stuff:
0x02002C5C
	+$0: Cursor position in main/pause menu
	+$4: Cursor position in item menu
	+$7: Lines scrolled in item menu

Monsters in battle:
0x58 bytes for each monster
+$00: Current status ailment(s)
+$04: ?
+$05: Next ailment to be applied/displayed
+$06: Morale
+$07: Hit Multiplier; 0,1 or 2
+$08: Current HP
+$0A: Max HP
+$0C: MP (zero)
+$0E: Max MP (zero)
+$10: Evasion (halfword)
+$12: Defence
+$14: Hit number
+$16: Hit rate
+$18: Attack
+$1A: Crit rate
+$1C: Attack Element
+$1E: (Zero)
+$20: Status inflicted
+$21: Monster family
+$22-3: Elemental weakness
+$24-5: Elemental resistance
+$26-7: temp ATK modifier
+$28-9: temp Hit modifier
+$2A-B: temp DEF modifier
+$2C-D: temp Eva modifier
+$2E-2F: temp resists
+$30-31: Dispel data (BICs elemental resists)
+$32-33: Magic Defence
+$34: If 0x1, actor may not attempt to recover from Sleep/Stun on current turn
+$35: Total STA (always 0)
+$36: Total INT
+$37: Total AGL
+$38: Total LUK
+$39: ?
+$3A: Target of next action
+$3C: Monster's action this turn
	0x07: Physical attack
	0x08: Casting
	0x09: Flee/Run
	0xFF: Nothing (if slept, stunned...)
+$3E: If casting, what spell to cast?

+$40: Monster 'size'; from 0 to 3
+$41: Monster ID

+$43: ? Read when monster is dying...how many pixels tall the monster is?

+$48-4B: VRAM offset of the monster's GFX data?

+$4C-4F: GFX pointer; data is organized in halfwords; top nybble is palette, rest is tile ID?
+$52-53: ? How many tiles long the monster's GFX is
+$54-55: ? How many tiles high the monster's GFX is

Player unit data during combat:
(In $0201.... range), directly before monster battle data
0x60 bytes per PC
+$00: Current status ailment(s)
+$04: Bitfield for Blink/Invis effects; 0x01 for Blink, 0x02 for Invis
+$05: Ailment to be applied/displayed
+$06: Morale? unused
+$07: Hit Multiplier; 0,1 or 2
halfwords:
+$08: Current HP
+$0A: Max HP
+$0C: Current MP
+$0E: Max MP
+$10: Evade
+$12: Defence
+$14: Number of Hits
+$16: Hit Rate
+$18: Attack
+$1A: Crit Rate
+$1C: Attack element(s)
+$1E: Family effectiveness
+$20: Always zero (status inflicted?)
+$22: Elemental weakness? (zero)
+$24: Elemental resists
+$26: temp ATK modifier
+$28: temp Hit modifier
+$2A: temp DEF modifier
+$2C: temp Eva modifier
+$2E: temp resists
+$30: Dispel stuff? (BICs elemental resist)

+$32: Magic Defence (halfword)

 bytes:
+$34: If 0x1, may not attempt to recover from Sleep/Stun on current turn

 +$35: Total STA
 +$36: Total INT
 +$37: Total AGL
 +$38: Total LUK

 +$39: ???

 +$3A: Target of next action
 +$3C: Action to take this turn/selected action; 0x00FF if doing nothing (or asleep/stunned/stoned/dead)
	0x00: Physical attack
	0x01: Casting spell
	0x02: Using item
	0x03: (Equip)
	0x04: Flee
 +$3E: Spell/item spell currently selected or being cast

 +$40: X-Coord?
 +$42: Y-Coord?

 +$44: Sprite (normal/casting/wounded etc) to use
	Written to depending on if in critical HP, statused, prospective action
	$00: Normal
	$03: Ready to act
	$08: Casting
	$0B: Fleeing
 +$45: Position of cursor in action menu?
 +$46: Holds Unit ID of current/last target of Attack
 +$47: Holds Unit ID of current/last target of spell
 +$48: Holds Unit ID of current/last target of item

 +$4C,4D: Position of cursor and page scroll respectively in Magic menu

 +$50,$51: Position of cursor and page scroll in Item menu
 +$52,$53: Item Type/ID of currently selected item in Item menu

 +$54,$55: Position of cursor, page scroll in equip/re-equip menu
 +$56,$57: Item Type/Sub-ID of currently selected equipment (equip menu only)

 +$5C: temp HP bonus; add to max HP
 +$5E: temp MP bonus


Target data:
+0x22: elemental weaknesses
+0x24: elemental resistances


A variable region, SomeMem:
	+$00: Pointer to Battle Memory
	+$04: Pointer to ?? memory
	+$08-14: List of unit IDs, in order of their acting during this turn
	In other circumstances, values may be:
	 +$09: List of PC unit IDs, 00 to 03? Alternatively 0xFF if can't act?
	 +$0E: Number of PCs who can act this turn? Starts at 0x00
	 +$14: ID of PC currently trying to level up
	+$15: Turn order index; rotates from 0-12 as each unit takes its turn (or doesn't)
	+$16: Acts as subroutine index for many routines
	+$17: Turn order # of currently acting unit?
	+$18: Acts as frame timer for some delays
	+$1A: Set to 0x0 when a monster's attack anim will begin
	+$1B: For attacking monster, physical attack animation ID
	+$1C: For defending PC only, shield blocking animation ID?
	+$20: Spell/ queue positions for each monster in battle, four bytes each
	 +$21 for Ability queue position
	+$36: Acts as delay before starting to display messages in battle victory?
	+$44: Unit ID of currently acting unit (for PCs/Item?)
	+$45: Unit ID of current target (for PCs/Item?)
	+$48: Pointer to battle data of currently acting unit
	+$4C: Pointer to battle data of acting unit's target
	+$50: Unit ID of currently acting unit
	+$51: ID of target of currently acting unit

OtherMem, a variable-offset region:
	+$573A: Acts as routine selector for $6A9A0 routine; values 00-08
	+$5978: Contains pointer to BattleMem base offset
	+$59CC: Region acts as a timer for start-of-battle messages?
		+$00: Pointer to BattleMem base offset?
		+$06: Timer for ambush/preemptive/(normal) messages
		+$08: Some counter?
		+$10: Acts as counter for Ambush/Preemptive messages, active unit readiness, other stuff

Battle memory (BattleMem):
	Base offset is inconstant, as Variable Memory is.
	+$0450: Some data table data for animated objects?
		-First 0xC are for PCs/Monsters, all after that are for targeting arrows, spell casting effects,etc
		$48 bytes long
		+$3A: X-Coord
		+$3C: Y-Coord
		+$3E: X Movement for this frame
		+$40: Y Movement for this frame
		+$43: Animation indicator?
			-Store 0x1 when animation is in progress
		+$44: Similar as $43

	+$0614: Used in main Item menu...
		0x00: Normal
		0x03: Item's description is still printing
		0x06: An item was selected for action
	+$0619: In field menus, ?
	+$1C10: Holds list of IDs of all animated objects in battle
	+$2875: Holds some object's ID
	+$2876: Read when printing damage/healing/miss numbers (gfx ID?)
	+$287C: Contains pointer to some stuff related to animations/damage printing
	+$2880: Unit ID of currently selected/active character in battle
	+$28DC: Set to 0x0 at end of a physical attack animation PC sprite tine cycling counter
	+$28E0: To do with spell auras...amount to increment PC palette cycle counter by
	+$28E4: Written to when applying spell auras to a character
	+$28E5: PC Sprite tint cycle direction; 0x0 when cycling 'up' to tint value, 0x1 when cycling 'down' to default
	+$2ECC: Holds total number of monsters; for Bestiary populating
	+$303C: Bestiary: start of big struct holding data for each monster, 0x28 bytes per monster (see bestiStruct)
	+$3826: Step counter; increments up to 0xF, resets when a battle happens; used for encounter rates
	+$48E6: If 0x0, disable palette cycling/tinting for PCs (or finished cycling for this frame)
	+$48E7: Stores if battle-to-be is normal, Ambush, or Preemptive
		0x0: Normal
		0x1: Preemptive
		0x2: Ambush
	+$48E8: Set of halfwords used by big bosses during death animations;
		each halfword is a pixel offset to a horizontal line of pixels
		Normal bosses start at $48F8; SoC bosses start at +$48E8
	+$49EA: Struct of two bytes per player character in battle
		-Palette tint 1
	+$49F2: Series of halfwords for each PC; current palette tint from spell aura
		During battle, each PC's palette tint oscillates between Tint 1 and Tint 2

	+$49FC: A memory pointer to do with I/O screen effects
	+$4A10: Holds pointer to some screen effects parameter stuff (for I/O fx)
	+$4A14: Works with above; number of screen effects entries to process
	+$4AD8: Pointer related to monster graphics?
	+$4ADE: Monster-related signed halfword
	+$4AEC: Pointer to Player Characters' data in memory
	+$4AF0: Pointer to inbattle inventory
	+$4AFC: Sets of four-byte ministructs, one for each PC, that indicate item usage during a combat round:
		$0: Type of item being used
		$1: Item's ID
		$2: Item's position in inventory
		$3: (padding)
	+$4B0C: Set of four bytes for each monster slot, indicating what item dropped in battle
	+$4B30-4B6F: List of swappable gear (by inventory slot) when re-equipping an equip slot
		-Each byte refers to the inventory position of every valid swappable piece
	+$4B70: When changing equips, refers to amount of valid equippable gear?
	+$4B71: When changing equips, refers to the equipment slot being changed (0-4)
	+$4B72: Encounter ID to load for battle
	+$4B74: Battle Background to use for battle
	+$4B76-79: List of monster species in this battle (up to 4)
	+$4B7A-7B: Number monsters in battle per monster species (also counts deads!)
	+$4B7E: Battle config for this encounter (9 small, 4 large, 2 large+6 small, etc)
	+$4B81: Read when printing damage/healing numbers...affects what sort of thing to print/palette?
	+$4B86: Something to do with PC sprite data in battle - added to PC unit ID when indexing to sprite data struct
	+$4B87: Some sort of index to BattleMem+$450 struct - used in battle menus
	+$4B8C: Something to do with turn order?
	+$4B8E: When casting Black Magic, holds ID of the little magic effect animation
	+$4B8F: As above, for White Magic
	+$4B90: Byte associated with animation stuff
	+$4B91: Something to do with unit gfx/animation data - adds to input ID to index to +$450 struct
	+$4B92: Current/Selected target for item magic?
	+$4B93: Current/Selected target for magic?
	+$4B94: Indicates how many targeting arrows to display, for multitarget spells
	+$4B95: Some gfx index for targeting arrows, other small things
	+$4B96: Indicates number of living monsters?
	+$4BEC: Pointer to...gfx? Seems to be 32 bytes per each PC
		+$4: Current palete tint. Cycles constantly according to latest spell aura
	+$4C10: Pair of halfwords read and written to when monster palette cycling is finished
	+$4C60: Pair of bytes, like above
	+$4C64: Same as $4C10
	+$4C84: Same as $4C60
	+$4C88: WRAM pointer, for printing numbers
	+$4C8C: 0xD written when entering Equip menu
	+$4C8F: 0x0 written when entering Equip menu
	+$4C90: Base offset of player unit data in battle
	+$4CB0: Used to index to monster unit data (monsters have smaller structs, so need this additional)
	  +$4CE0: For first PC, this and next few bytes indicate item being used + type + position in inventory
		$00: Column
		$01: Row
		$02: Item Type
		$03: Item sub-ID
	  +$4CE4: Byte indicating 'horizontal' position in in-battle Equip menu
	  +$4CE5: Byte indicating vertical scroll position in in-battle Equip menu
	+$4E10: First monster's data in battle
	  +$4E51: Indexes to monster battle data +$41 (Monster ID)
	  +$4E5C: Indexes to monster battle data +$4C
	+$4EB0: Outside battle, holds ?
	+$5128: Animation settings for each PC (0x14 bytes each)
		+$01: Which PC animation settings thing to load
		+$0F: Is currently animating?
	+$51C8: 00 written when entering Equip menu
	+$51CA: Halfword bitfield to do with targeting arrows
		-if bit 01 is set, remove arrows; else apply them
	+$51CC: If 0x2, all PCs dead; if 0x03, all monsters dead; else 0x01
	+$51CD: Series of nine bytes, one for each monster in battle
		0x01 If the monster of that ID is going through its death animation, 0x0 otherwise
	+$51D8: Pointer to halfword table, one for each possible monster in battle
		Each entry in the table serves as a frame counter for death animations
		...Which is used to index to a ROM table indicating the order to erase lines/other stuff in
		(Do boss monsters use this? probably)
	+$51DE: Used as subroutine index in victory handling routine
		-Also written 0x1 when a combat round is over?
	+$51DF: Used as subroutine index in base active PC interface routine
	+$51E0: Series of 0x14-byte structs for all 4 PCs + 9 monsters indicating what happened to them from current attack?
		-Used for animation purposes; cleared at start of every new attack/spell and at combat round end
		+$00: Attacker's ID
		+$01: What happened? (0xFF = not affected) (0x00 = regen health?)
		+$04: Damage/healing done
		+$08: If attacked, whether attack hit; for physical attacks, number of hits
		+$0C-0D: if bit 0x10 set, skip some handling...type of effect?
			0x001: Damage (from Poison?)
			0x004: Status effects set
			0x040: If set, play shield block animation
			0x102: Healing
		+$10-11: Status effects to set/clear
	+$52E4: Struct used by every unit
		+$00: 01 if affected by last attack
		+$03: Base Y-offset of damage/miss number
		+$04: Counter for damage number 'bouncing' effect
		+$06: Overall timer for how long to display damage numbers
	+$534C: 0x1 if a physical/spell animation is ongoing?
	+$5352: Halfword timer for animations?
	+$5355: Some indicator for PC animation?
	+$5356: Total XP for this encounter
	+$5358: Total Gil reward for this encounter
	+$535A: Monster palette cycling timer? Controls the pace of monster action palette switching
	+$535C: During level up, will hold character's permanent data pointer
		-Also, the halfwords after this hold the amounts that stats went up by
		-For printing the increases later!
	+$56E8: Contains pointer to memory region used in text printing
	+$56F0: Contains WRAM pointer used in printing text and numbers
	+$56FC: When selecting a menu option, holds cursor position, ie which menu to open!
		0x00: Item
		0x06: Save
	+$5700: In field menus, serves as ?
		-Store 0x04 when about to 'use' a weapon/armor
	+$5704: In field menus, serves as some sort of mode indicator:
		0x00: Normal (no item highlighted)
		0x01: Item selected once
	+$5708: In field menus, holds ID of selected PC
	+$5714: Pointer to start of player data structs...only used in field routines?
	+$5718: Pointer to inventory struct

	+$7F54: SFX ID to play; used in the item menu
	+$7F56: ID of PC selected for item use outside battle, or inv. position of selected item
		-Also for second PC selected for Formation swapping

	+$802C: Pointer to $02002C5C, which has some info on cursor position in menus
		+$0C: Spell selected by each PC in main magic menu; one byte per, from $0-$17

	+$90C4: Current X Position on World Map
	+$90C6: Current Y Position on World Map

	+$9668: Stuff to do with monster death animations?
	+$9700: Pointer to some memory counters related to fiend death animations?

	+$B57C: Caster's actor ID, when casting a spell
	+$B57D: Spell target's actor ID

	Variable Memory, VarMem:
	+$000: Current map ID (0x0 for overworld)
	+$004: If inside a room, 0x0; else 0x1
	+$008: X-Coord, pixels; each step is 16 (0x10)
	+$00A: Y-Coord, pixels
	+$00C: Current facing (up, down, left, right)
	+$010: Current mode of transport:
		0x00: On Foot
		0x01: Canoe
		0x02: Ship
		0x03: Airship
	+$028: Some structs, 8 bytes long, to do with events/map NPCs
		+$0: X-Coord (long)
		+$2: Y-Coord (short)
		+$4: Current animation frame / orientation
	+$154: Chest state bitfield
	+$174: Event state bitfield; used for main game
	+$594: Counts how many floors you've traversed in current dungeon
	+$71C: Event state bitfield; used for the SoC fairies?
	+$74C: Some counter for use with the SoC trading quest floor
	+$7AC: Location of PC out-of-battle data
	+$8CC: Location of inbattle inventory
	+$B94: Party Gil count
	+$B98: Game clock; records in seconds time elapsed since New Game
	+$B9C: Global step counter? It does increment with every step
	+$BA0: Options byte
		0x01: Auto-dash ON
		0x02: Cursor MEMORY
		0x04: Unused-ish (Formerly Kanji bit?)
		0x08: Unused?
		0x10: Unused?
		0x20: Unused?
		0x40: Message Speed 2
		0x80: Message Speed 3
			0xC0: Message Speed 4
	+$BA2: Window colours halfword
		0x1000: Blue intensity (0-7 multiples)
		0x0080: Green intensity (0-7)
		0x0004: Red intensity (0-7)
	+$BA4: ?? Set to 0x708 at New Game...doesn't change much
	+$BA8: Set to 0xE10 at NG...double 0x708, and does change somewhen
	+$BAC: Set to 0x1C20 at NG...double 0xE10, and does change somewhen
	+$BB0: Set to 0x0000 at NG
	+$BB2: Set to 0x0000 at NG
	+$BB4: List of amount of monsters slain thus far. Two bytes per monster
		-Bit 0x8000: If unset, this monster's Bestiary page is unviewed


Some memory region used when starting a new game:
	+$555: New Game+ indicator; 0x01 if in NG+
	+$556: When a game is beginning, holds the text data for PC names
	+$58E: At New Game start, holds class IDs of all PCs

	+$2F44: Pointer to PC data base offset (usually 0x020026CC)

Some memory region related to map/floor and event data, MapMem:
	+$BE0: 
	+$7DAC: Pointer to stack struct holding data on event execution
		The structure is as follows:
		+$00: Pointer to offset of current event command
		+$18: Usually for prices (Inns, Revivals, etc)
		+$44: Music playing
		+$48: bitfield for event execution
			0001: if unset, first time running the current command
			4000: Party is moving?
			8000: ?
	+$801C:
	+$90B4: Movement stuff?
	+$90B8: Coord change to be made
	+$90BC: Current coords before movement
	+$90C0: ? set to zero when movement begins
	+$90C2: Movement speed
	+$90D8: Various flags for party leader sprite:
		0x01: Visible
	+$90DC: Map ID
	+$90EC: Data for each sprite/NPC object on the map
		$AC bytes for each?
		+$00: Map Sprite ID
		+$3C: Some bitfield
		+$64: Init. as 0; x offset in pixels
		+$66: Init. as 0; y offset in pixels
		+$74: X-Coord (current)
		+$76: Y-Coord
		+$78: X-Coord (destination)
		+$7A: Y-Coord
		+$88-89: bitfield for collision data:
			0x01: exists?
			0x02: visible/interactible
			0x20: blocks movement
		+$8E: Current facing/animation frame

AnimMem, for spell/weapon/monster animations:
	+$00CD: Target ID
	+$00D4: Location of data related to current animation command?
		+$00: Some tile identifier...
		+$04: Coordinate params
		+$08: Segment/run count (for repeating commands, tile movement etc)
		+$0C: current x-coord
		+$10: current y-coord
		+$14: (these following ones depend on context)
		+$18: 
		+$1C: 
		+$20: 
		+$24: 
	+$AE9C: Pointer to BattleMem
	+$AEA4: Where data for preloaded GFX is held; these data structs have IDs attached


Bestiary Struct:
	-$04-$01: Monster Name Text Pointer
	+$00-01: Defeated Count
	+$02-03: Max HP
	+$04-05: (UNUSED)
	+$06-07: Attack
	+$08-09: Accuracy
	+$0A-0B: Defense
	+$0C-0D: Intelligence
	+$0E-0F: Agility
	+$10-11: Evasion
	+$12-13: Magic Defense
	+$14-15: Elemental Weaknesses (reordered)
	+$16-17: Elemental Resistances (reordered)
	+$18-19: (UNUSED)
	+$1A-1B: Gil
	+$1C-1D: EXP
	+$1E-1F: Monster Size
	+$20-23: Dropped Item Name Text Pointer